home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / SYS_TOOL / BBSYSINF / SYSINFO.TXT < prev   
Text File  |  1996-04-10  |  3KB  |  92 lines

  1.                 TSYSINFO 2.0  written by Brent Boswell - 1996
  2.                 ------------
  3.  
  4. TSysInfo 2.0 is a non visual component written for Delphi 2.0 that
  5. gets details about your computer. eg.  Registered Organisation and
  6. Owner, etc..
  7.  
  8. It has 8 properties that you are able to see at design time in the
  9. Object Inspector :-
  10.  
  11.    1. Organisation    - string
  12.    2. Owner           - string
  13.    3. CPU             - string
  14.    4. OperatingSystem - string
  15.    5. WinVersion      - string
  16.    6. Build           - string
  17.    7. TotalMemory     - string
  18.    8. DriveC          - string
  19.  
  20. To use TSysInfo drop onto a form at design time.  Assign any TLabel
  21. Caption to any of the above properties, or any other object that has
  22. a string value.
  23.  
  24. To install TSysInfo copy the enclosed files into a common VCL
  25. directory.  In Delphi use the Install option on the Components menu
  26. to install TSysInfo into your component library.  By default
  27. TSysInfo will be installed into the Samples page.  However you are
  28. free to move it once it's installed or you can modify the register
  29. procedure in the code.
  30.  
  31. Included with this Component is another Unit containing another
  32. Class object.  This Class Object is called TBBRegIniFile.  It has
  33. all the properties and functions of TRegIniFile, with one exception,
  34. in that you have to specify an additional parameter, being a Key for
  35. searching in the Registry.
  36.  
  37. I don't know if I'm just not able to use the TRegIniFile properly,
  38. but I could only get it to look in HKEY_CURRENT_USER, which to me is
  39. pretty pointless if you wish to have full acess to the registry.
  40. With TBBRegIniFile you specify the Key in which you wish to look.
  41. eg.
  42.  
  43. var
  44.    RegIni : TBBRegIniFile;
  45.    TestString : string;
  46. begin
  47.    RegIni := TBBRegIniFile.Create('\SOFTWARE\Microsoft\Windows', HKEY_LOCAL_MACHINE');
  48.    TestString := RegIni.ReadString('CurrentVersion', 'ProductName', 'Failure');
  49.    RegIni.Free;
  50. end;
  51.  
  52. The above piece of code will look in HKEY_LOCAL_MACHINE in the
  53. subkey '\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductName' and
  54. assign the value in 'ProductName' to TestString.  If it doesn't find
  55. anything or that subkey doesn't exist, TestString gets assigned
  56. 'Failure'.  Remember when looking in the registry all the keys and
  57. subkeys are CASE SENSITIVE.
  58.  
  59. TSysInfo has ONLY been tested on Windows 95 as I don't have a NT Box
  60. currently available to me.  I am in the process of building up a
  61. machine on which to run Windows NT Server.
  62.  
  63. TSysInfo including TBBRegIniFile is released as FREEWARE and you are
  64. free to distribute and modify the code in any way you feel.  I will
  65. NOT however be held responsible for any damages or mishaps that may
  66. occur out of the use of this component.
  67.  
  68. If you like my component or modify it can you send me some email at
  69. the email address below.  Also could you send me a post card of your
  70. Town or City at the snail mail address below.  I'd just like to hear
  71. from others around the world.  I will try to reply to any email or
  72. snail mail that I receive.  Thanks.
  73.  
  74. email :
  75.  
  76.     b.boswell.saf0901@oasis.icl.co.uk
  77.  
  78. snail mail :
  79.  
  80.     Brent Boswell
  81.     14 Dawn View
  82.     Cleland
  83.     Pietermaritzburg
  84.     Natal
  85.     3201
  86.     South Africa
  87.  
  88.  
  89. Thanks
  90.  
  91. Brent Boswell
  92.